package com.hoshiicloud.goods.feign.hystrix;

import com.hoshiicloud.common.query.UploadFileResponse;
import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.goods.feign.IdGeneratorService;
import com.hoshiicloud.goods.feign.UpLoadFileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.multipart.MultipartFile;

/**
 * 图片上传
 */
public class UploadFileFeignFallback implements UpLoadFileService {
    private Logger logger = LoggerFactory.getLogger(this.getClass());


    @Override
    public Response uploadFile(MultipartFile file, String bucketName, String objectKey, String fileName, String folder, Boolean privateOwned) {
        return null;
    }

    @Override
    public Response<UploadFileResponse> fileUpload(String bucketName, String objectKey, String fileName, String folder, Boolean privateOwned, MultipartFile file) {
        logger.error("hoshiicloud-goods文件上传失败");
        return Response.failed("hoshiicloud-goods文件上传失败");
    }
}
